#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 crane <crane@crane-pc>
#
# Distributed under terms of the MIT license.

"""

"""


class SegmentTreeNode:
    def __init__(self, start, end, max):
        self.start, self.end, self.max = start, end, max
        self.left, self.right = None, None


class Solution:
    """
    @param root: The root of segment tree.
    @param start: start value.
    @param end: end value.
    @return: The maximum number in the interval [start, end]
    """
    SEG_MIN = -1234567890
    def query(self, root, start, end):
        # write your code here
        if start <= root.start and end >= root.end:
            return root.max
        if start > root.end or end < root.start:
            return self.SEG_MIN

        return max(
            self.query(root.left, start, end),
            self.query(root.right, start, end))


def main():
    print("start main")

if __name__ == "__main__":
    main()
